<?php
namespace App\Middleware;

use Closure;

class Testt
{
	

    /**
     * 处理传入的请求
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
    	echo '这里是中间件2<br>';

        $response = $next();

        echo '这里是中间件2后置<br>';
        $response['xx'] = '中间件注入json';

        return $response;
    }

}